<template>
  <div>
    <div>
      <el-radio-group v-model="radio">
        <el-radio label="1">工伤登记审批表</el-radio>

        <!-- <el-radio :label="9">备选项</el-radio> -->
      </el-radio-group>
    </div>
    <div style="margin: 30px" v-if="radio==1">
      <el-form :model="queryParams" ref="queryForm" label-width="100px" :inline="true">
        <el-form-item label="申请人姓名" prop="roleName">
          <el-input
            v-model="queryParams.roleName"
            placeholder="请输入"
            clearable
            class="hw"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="性别" prop="roleKey">
          <el-select v-model="queryParams.status" placeholder="请选择" clearable class="hw">
            <el-option
              v-for="dict in dict.type.sys_normal_disable"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="出生日期" prop="roleKey">
          <el-date-picker
            v-model="queryParams.dateRange"
            class="hw"
            value-format="yyyy-MM-dd HH:mm:ss"
            type="daterange"
            range-separator="-"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :default-time="['00:00:00', '23:59:59']"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="身份证号" prop="roleName">
          <el-input
            v-model="queryParams.roleName"
            placeholder="请输入"
            clearable
            class="hw"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="联系电话" prop="roleName">
          <el-input
            v-model="queryParams.roleName"
            placeholder="请输入"
            clearable
            class="hw"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="家庭住址" prop="roleName">
          <el-input
            v-model="queryParams.roleName"
            placeholder="请输入"
            clearable
            class="hw"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="工种/岗位" prop="roleName">
          <el-input
            v-model="queryParams.roleName"
            placeholder="请输入"
            clearable
            class="hw"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>

        <el-form-item label="部门" prop="roleKey">
          <el-select v-model="queryParams.status" placeholder="请选择" clearable class="hw">
            <el-option
              v-for="dict in dict.type.sys_normal_disable"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="参加工作时间" prop="roleKey">
          <el-date-picker
            v-model="queryParams.dateRange"
            class="hw"
            value-format="yyyy-MM-dd HH:mm:ss"
            type="daterange"
            range-separator="-"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :default-time="['00:00:00', '23:59:59']"
          ></el-date-picker>
        </el-form-item>

        <el-card class="box-card">
          <div slot="header" class="clearfix" shadow="never">
            <span>事故事件、地点、主要原因</span>
          </div>
          <el-form-item label="事故事件、地点、主要原因" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              class="hw"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="日期" prop="roleKey">
            <el-date-picker
              v-model="queryParams.dateRange"
              class="hw"
              value-format="yyyy-MM-dd HH:mm:ss"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :default-time="['00:00:00', '23:59:59']"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="备注" prop="roleKey">
            <el-input
              type="textarea"
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              class="hw"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-card>
        <el-card class="box-card">
          <div slot="header" class="clearfix" shadow="never">
            <span>受伤害部位及诊断结论</span>
          </div>
          <el-form-item label="受伤害部位及诊断结论" prop="roleKey">
            <el-input
              type="textarea"
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              class="hw"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-card>
        <el-card class="box-card">
          <div slot="header" class="clearfix" shadow="never">
            <span>证明人</span>
          </div>
          <el-form-item label="证明人" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              class="hw"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="日期" prop="roleKey">
            <el-date-picker
              v-model="queryParams.dateRange"
              class="hw"
              value-format="yyyy-MM-dd HH:mm:ss"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :default-time="['00:00:00', '23:59:59']"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="备注" prop="roleKey">
            <el-input
              type="textarea"
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              class="hw"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-card>
        <el-card class="box-card">
          <div slot="header" class="clearfix" shadow="never">
            <span>安监部</span>
          </div>
          <el-form-item label="安监部" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              class="hw"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="日期" prop="roleKey">
            <el-date-picker
              v-model="queryParams.dateRange"
              class="hw"
              value-format="yyyy-MM-dd HH:mm:ss"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :default-time="['00:00:00', '23:59:59']"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="备注" prop="roleKey">
            <el-input
              type="textarea"
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              class="hw"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-card>
        <el-card class="box-card">
          <div slot="header" class="clearfix" shadow="never">
            <span>公司安全生产领导小组(分管领导)</span>
          </div>
          <el-form-item label="公司安全生产领导小组(分管领导)" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              class="hw"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="日期" prop="roleKey">
            <el-date-picker
              v-model="queryParams.dateRange"
              class="hw"
              value-format="yyyy-MM-dd HH:mm:ss"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :default-time="['00:00:00', '23:59:59']"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="备注" prop="roleKey">
            <el-input
              type="textarea"
              v-model="queryParams.roleKey"
              placeholder="请输入"
              clearable
              class="hw"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-card>
      </el-form>
    </div>

    <div class="bt" style="text-align: center !important;">
      <el-button
        type="primary"
        @click="submitForm('queryForm')"
        v-if="isCreate!=2"
      >{{radio==1?'打印工伤审批表':'打印事故处理意见表'}}</el-button>
      <el-button style="width:100px" @click="close">取消</el-button>
    </div>
  </div>
</template>
  <script>
export default {
  dicts: ["sys_normal_disable"],
  data() {
    return {
      radio: "1",
      queryParams: {},
      checkList: []
    };
  },
  mounted() {
    this.$refs["queryForm"].resetFields();
  },
  methods: {
    submitForm() {
      console.log(queryParams, "queryParams");
    },
    close() {
      this.$emit("close");
    }
  }
};
</script>
<style>
.hw {
  width: 300px;
}
</style>